package com.summer.io;

import java.io.File;
import java.io.IOException;

public class filetest1 {
    public static void main(String[] args) {
        File file = new File("hi.txt");
        if (!file.exists()){
            try {
                file.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
            System.out.println("创建成功");
        }else {
            file.delete();
            System.out.println("删除成功");
        }
        String s = "1.jpg";
        boolean b = s.endsWith(".jpg");
    }
    //创建目录 file.mkdir/file.mkdirs
}
